package com.timmy.google_play.base;

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.widget.ListView;

import com.timmy.google_play.utils.UIUtils;

/**
 * Created by Timmy on 2016/12/12.
 */

public class ListViewFactory {

    public static ListView createListView() {
        ListView listView = new ListView(UIUtils.getContext());

        //对listview进行统一的属性设置
        listView.setDividerHeight(0);
        listView.setFooterDividersEnabled(true);

        listView.setSelector(new ColorDrawable(Color.TRANSPARENT));


        //兼容设置,需要在2.3的手机上才可以看得到效果
        listView.setCacheColorHint(Color.TRANSPARENT);

        return listView;
    }
}